#!/usr/bin/perl
use strict;
package ns;

sub msg {
    my ($nsnum,$dbh,$input,$remote,$VER,$NETWORK,$nsnick) = @_;
    my @input = @$input;
    undef @$input;
    my @msgcmd = split(/:/,$input[3]);
    my $msgcmd = lc($msgcmd[1]);
    undef @msgcmd;
    if (!(-e "./ns/$msgcmd\.pl")) {
	print $remote "$nsnum O $input[0] :No Such Command - $msgcmd\n";
    }
    else {
	my $eval = `cat ./ns/$msgcmd\.pl`;
	eval($eval);
	undef $eval;
    }
}
1;
